***Syntax Zero-sum thinking and the cultural threat of Muslim immigrants' religious rights 
***Study 1

**Recoding experiments
*Meal Experiment
gen Q15rev=Q15
recode Q15rev (1=0) (2=0.33) (3=0.66) (4=1)
gen Q15_demand2rev=Q15_demand2
recode Q15_demand2rev (1=0) (2=1)
gen Q15_mealrev=Q15_meal
recode Q15_mealrev (1=1) (2=0)

*Holiday Experiment
gen Q16rev=Q16
recode Q16rev (1=0) (2=0.33) (3=0.66) (4=1)
gen Q16_holidayrev=Q16_holiday
recode Q16_holidayrev (1=0) (2=1) (3=2)

**Main covariates
*IMCP Index
alpha Q17_1 Q17_2 Q17_3 Q17_4, gen(imcp)

*Dichotomous variable for graphs, leaving out the neutral middle category
gen imcp_dich=.
recode imcp_dich (.=1) if imcp>3
recode imcp_dich (.=0) if imcp<3

*Splitting IMCP in thirds for robustness tests
gen imcp_high=0
recode imcp_high (0=1) if imcp>3.6
gen imcp_low=0
recode imcp_low (0=1) if imcp>2.4

*Immigration attitudes for robustness tests (high=pro-immigration)
alpha Q40 Q41 Q42, gen(immig)
gen immig_dich=.
recode immig_dich (.=1) if immig>4.9
recode immig_dich (.=0) if immig<4.9
tab1 immig immig_dich

**Covariates for balance checks, Tables A9 and A10
*Gender
gen female=Q65
recode female (1 3=0) (2=1)

*LeftRight
gen LeRi=Q23
gen RiLe=((LeRi)*-1)+10
gen RiLe_dich=.
recode RiLe_dich (.=0) if RiLe<5 /*right*/
recode RiLe_dich (.=1) if RiLe>5 /*left*/

*Education
gen edu=Q68
recode edu (7=0) (5 6=.)

*Age
gen age=Q67
recode age (-99=.) (1961=60) (1982=39)

*Christian identity
gen christ=0
recode christ (0=1) if Q26==1 | Q26==2 | Q26==3

*Religiosity
gen relig=Q29

*Recoding attention checks
gen attention=0
recode attention (0=1) if Q63_10==4 /*In second attention check (Q61) everbody got it right*/

**Analyses
*Table A1: Mean values canteen experiment, study 1
*IMCP values
mean Q15rev, over(Q15_meal)
mean Q15rev if imcp_dich==0, over(Q15_meal)
mean Q15rev if imcp_dich==1, over(Q15_meal)
*Immigration attitudes values
mean Q15rev if immig_dich==0, over(Q15_meal)
mean Q15rev if immig_dich==1, over(Q15_meal)

*Table A2: Mean values holiday experiment, study 1
mean Q16rev, over(Q16_holiday) 
mean Q16rev if imcp_dich==0, over(Q16_holiday)
mean Q16rev if imcp_dich==1, over(Q16_holiday)
*Immigration attitudes values
mean Q16rev if immig_dich==0, over(Q16_holiday)
mean Q16rev if immig_dich==1, over(Q16_holiday)

*Regressions Table A5
*IMCP
reg Q15rev Q15_meal imcp
outreg2 using zerosum1.doc, replace
reg Q15rev Q15_meal##c.imcp
outreg2 using zerosum1.doc, append
*Immigration attitudes values
reg Q15rev Q15_meal immig
outreg2 using zerosum1.doc, replace
reg Q15rev Q15_meal##c.immig
outreg2 using zerosum1.doc, append

*Regressions Table A6
*IMCP
reg Q16rev b2.Q16_holidayrev imcp
outreg2 using zerosum2.doc, replace
reg Q16rev b2.Q16_holidayrev##c.imcp
outreg2 using zerosum2.doc, append
*Immigration attitudes values
reg Q16rev b2.Q16_holidayrev immig
outreg2 using zerosum2.doc, replace
reg Q16rev b2.Q16_holidayrev##c.immig
outreg2 using zerosum2.doc, append

*Table A9: Balance check: Canteen experiment, study 1 (Means)
mean female age edu imcp immig LeRi, over(Q15_meal)

*Table A10: Balance check: Holiday experiment, study 1 (Means)
mean female age edu imcp immig LeRi, over(Q16_holiday)
